package cn.net.ecode.common.datasource;

/**
 * 多数据源句柄
 * @author ThinkGem
 * @version 2015-6-15
 */
public class DataSourceHolder {

	private static final ThreadLocal<String> dataSourceName = new ThreadLocal<String>();

	public static void setDataSourceName(String dataSourceName) {
		DataSourceHolder.dataSourceName.set(dataSourceName);
	}

	public static String getDataSourceName() {
		return DataSourceHolder.dataSourceName.get();
	}

	public static void clearDataSourceName() {
		DataSourceHolder.dataSourceName.remove();
	}

}
